cmake_minimum_required(VERSION 3.11)

# set(CMAKE_EXE_LINKER_FLAGS"${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")

project(ldui)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=1")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
    message("==>>Debug Model")
    SET(CMAKE_VERBOSE_MAKEFILE ON)
    add_compile_options(-Wall -D_DEBUG -Wno-sign-compare -g -Wno-strict-aliasing -Wno-comment)
else()
    message("==>>Release Model")
    add_compile_options(-Wall -Wno-sign-compare -O3 -Wno-strict-aliasing -Wno-comment)
endif()
include_directories(src
        src/base
        src/duilib
        src/ui_components
        include)
add_definitions(-DUNICODE -D_UNICODE)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

add_subdirectory(src/base)
add_subdirectory(src/duilib)
add_subdirectory(src/ui_components)
add_subdirectory(examples/basic)

